package norbert.commons {
	import mx.logging.ILogger;
	import mx.logging.Log;
	
	/**
	 * Entry is an object containing a key/value
	 * combination.
	 */
	public class Entry {
		private static var logger: ILogger = Log.getLogger("norbert.commons.Entry");
		
		private var _name:String;
		private var _value:String;
		private var _required: Boolean;
	
		/**
		 * Construct a new name value pair
		 *
		 * @langversion ActionScript 3.0
		 * @playerversion Flash 8.5
		 * @tiptext
		 */
		public function Entry( name:String = "", value:String = "", required: Boolean = false ) {
			_name = name;
			_value = value;
			_required = required;
		}
		
		[Bindable]
		/**
		 * Returns the name
		 *
		 * @langversion ActionScript 3.0
		 * @playerversion Flash 8.5
		 * @tiptext
		 */
		public function get name():String {
			return _name;
		}
		
		/**
		 * Sets the name
		 *
		 * @langversion ActionScript 3.0
		 * @playerversion Flash 8.5
		 * @tiptext
		 */
		public function set name( value:String ):void {
			_name = value;
		}
		
		[Bindable]
		/**
		 * Returns the value
		 *
		 * @langversion ActionScript 3.0
		 * @playerversion Flash 8.5
		 * @tiptext
		 */
		public function get value():String {
			return _value;
		}
		
		/**
		 * Sets the value
		 *
		 * @langversion ActionScript 3.0
		 * @playerversion Flash 8.5
		 * @tiptext
		 */
		public function set value( v:String ):void {
			_value = v;
		}
		
		[Bindable]
		public function get required(): Boolean {
			return _required;
		}
		public function set required(value: Boolean): void {
			_required = value;
		}
	}	
	
}
